<?php
class Home extends CI_Controller{

	public function index()
	{

		$this->check_isvalidated();
		$data['title'] = 'CG3002';
		$this->load->view('templates/header', $data);
		$this->load->view('index', $data);
		$this->load->view('templates/footer', $data);

	}

	private function check_isvalidated(){
		if($this->session->userdata('validated')){
			redirect('transaction');
		}
	}
	public function logout(){
		$this->session->unset_userdata('validated');
		$this->session->sess_destroy();
		redirect('', 'refresh');
	}
}